Skip to content

Add missing level_override instance variable to logger #initialize#32

Merged
briensea merged 4 commits into
aws:mainfrom
choosen:patch-1
Mar 5, 2025
Merged

Add missing level_override instance variable to logger #initialize#32
briensea merged 4 commits into
aws:mainfrom
choosen:patch-1

Conversation

@choosen

@choosen choosen commented Jun 28, 2024

Copy link
Copy Markdown
Contributor

Adds compatibility for most recent, included in ruby 3.3.3 logger. ruby/logger@7aabb0b

Issue

I've got 3.3.3 ruby with bundled Logger 1.6.0

eval error: undefined method `[]' for nil
  /Users/dev/.asdf/installs/ruby/3.3.3/lib/ruby/3.3.0/logger.rb:384:in `level'
  /Users/dev/.asdf/installs/ruby/3.3.3/lib/ruby/3.3.0/logger.rb:653:in `add'
  /Users/dev/.asdf/installs/ruby/3.3.3/lib/ruby/3.3.0/logger.rb:697:in `info'
  /Users/dev/.asdf/installs/ruby/3.3.3/lib/ruby/3.3.0/forwardable.rb:240:in `info'

there is missing empty hash in initialize.

Description of changes:

It should be compatible with previous versions of Ruby.

Target (OCI, Managed Runtime, both):

ruby 3.3.3 or most recent logger version.
I run lambda in self hosted ruby container in general, but it is not required to test within docker, as code breaks on specs when applying LoggerPatch.


solves #33

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@choosen

choosen commented Aug 30, 2024

Copy link
Copy Markdown
Contributor Author

@trivenay Can you look at it ?

@choosen

choosen commented Aug 30, 2024

Copy link
Copy Markdown
Contributor Author

or @briensea ?

@choosen

choosen commented Sep 2, 2024

Copy link
Copy Markdown
Contributor Author

logger 1.6.1 started to be compatible :)
#33 (comment)

if you want to be with bundled logger gem with 3.3 ruby please merge it, to not force for workarounds

@choosen

choosen commented Feb 28, 2025

Copy link
Copy Markdown
Contributor Author

adapted to changes from https://github.com/ruby/logger/pull/100/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants